namespace game {
    export namespace tween {

        /**
         * Q弹效果
         */
        export class QTan{

            /***
             * 基础的Q弹效果
             * @param {cc.Node} node
             * @param {number} smallScaleX
             * @param {number} smallScaleY
             * @param {number} bigScaleX
             * @param {number} bigScaleY
             * @param {number} time
             * @param {number} timeGap
             * @param {number} timeGapRandom
             */
            public static normal(node:cc.Node,smallScaleX = 0.88,smallScaleY = 0.88, bigScaleX = 1.12, bigScaleY = 1.22, time = 0.2, timeGap = 2, timeGapRandom = 2):void {
                let scaleX = node.scaleX;
                let scaleY = node.scaleY;
                lib.Tween.to(node,time,{scaleX:smallScaleX * scaleX,scaleY:bigScaleY * scaleY}).delay(timeGap+timeGapRandom*Math.random()).
                to(time, {scaleX:bigScaleX * scaleX,scaleY:smallScaleY * scaleY}).to(time,{scaleX:scaleX,scaleY:scaleY}).timeLine.setLoop(1000000000);
            }
        }
    }
}